package com.teradyne.phoenix.client.activities;

import com.google.gwt.activity.shared.AbstractActivity;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.place.shared.PlaceController;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.teradyne.phoenix.client.factory.AppFactory;
import com.teradyne.phoenix.client.locale.AppLocale;
import com.teradyne.phoenix.client.views.UserView;
import com.teradyne.phoenix.shared.PhoenixServiceAsync;

public class UserActivity extends AbstractActivity implements UserView.Presenter {

	private final PhoenixServiceAsync rpcService;
	private final EventBus eventBus;
	private final UserView display;

	private PlaceController placeController;
	private AppLocale appLocale;

	public UserActivity(AppFactory appFactory) {
		this.rpcService = appFactory.getPhoenixService();
		this.eventBus = appFactory.getEventBus();
		this.display = appFactory.getUserView();
		this.placeController = appFactory.getPlaceController();
		this.appLocale = appFactory.getAppLocale();
	}
	
	@Override
	public void start(AcceptsOneWidget container, EventBus eventBus) {
		container.setWidget(display.asWidget());
		display.setPresenter(this);
	}

	@Override
	public void createButtonHandler() {
		Window.alert("User Create!");
	}

	@Override
	public void updateButtonHandler() {
		Window.alert("User Update!");
	}

	@Override
	public void deleteButtonHandler() {
		Window.alert("User Delete!");
	}


}
